package SpringCloudBase.controller;

import SpringCloudBase.desc.FeginClient01;
import SpringCloudBase.fegin.UserFegin;
import SpringCloudBase.vo.UserVO;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ConsumerController
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/3/31 17:31
 */
@RestController
public class ConsumerController {

    @Autowired
    private UserFegin userFegin;
    @Autowired
    private FeginClient01 feginClient01;

    @GetMapping("/user/{id}")
    public UserVO getUser(@PathVariable Long id){
        return feginClient01.getOrder(id);
    }

    @GetMapping("/getUser")
    public User getUser(User user){
        return user;
    }

}
